package org.giovanolli.mumi.view.converter;

import javax.faces.convert.FacesConverter;

import org.giovanolli.mumi.entities.AttentionTypeMode;

@FacesConverter(value = "attentionTypeModeConverter")
public class AttentionTypeModeConverter extends SelectItemsBaseConverter<AttentionTypeMode> {
	@Override
	public String getAsString(Object value) {
		return ((AttentionTypeMode) value).name();
	}

	@Override
	public String getItemLabel(AttentionTypeMode object) {
		return object != null ? object.name() : null;
	}

	@Override
	public Object getItemValue(AttentionTypeMode object) {
		return object;
	}

}